package com.hm.hsw3;

public  class RandomNumHandlerDemo <E>{
    public static void main(String[] args) {
        useRandomNumHandler(new RandomNumHandler() {
            @Override
            public Object getNumber() {
                return "花开花落";
            }
        });
         useRandomNumHandler(()-> "花开花落");
    }

    public static  void useRandomNumHandler(RandomNumHandler randomNumHandler){
        String number = (String)randomNumHandler.getNumber();
        System.out.println(number);
    }
}
